#!/bin/bash

#./deploy-front.sh

echo "---------------------------------------------------------------------------------------------------------------------------------------------"

# 构建前端项目
# 构建时内存可能不够，可以启用虚拟内存，参考：https://developer.baidu.com/article/detail.html?id=2053828
cd front-scms
pnpm i
pnpm run build:pro
rm -rf /opt/install/nginx/html/scms
mv dist-pro /opt/install/nginx/html/scms
#斜杠强制覆盖
\cp -f cicd/scms.conf /opt/install/nginx/conf/scms.conf
docker restart nginx
